General: Improve diagnostics for unknown AAP protocol messages#511
Merged
General: Improve diagnostics for unknown AAP protocol messages#511
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
No user-facing behavior change. Diagnostic-only: when the AAP decoder receives a message it can't decode, the log line now includes the payload bytes, how long ago the last command was sent, and what that last command was. Makes it possible to correlate unknown device-pushed opcodes with the command that likely triggered them.
Technical Context
lastSentCommand/lastSentAttracking recorded insendRaw, alongside the existing ANC-specific timestamp which still drives ANC debounce logic."Unhandled message: cmd=0xNNNN payload=NB"line (DEBUG) is replaced with an INFO line carrying the payload hex,sinceLastSendms, and theAapCommandsubclass that was sent. Bumped to INFO so the signal lands in default debug recordings without bumping the overall verbosity.0x004C,0x0052,0x0055, a settings-envelope frame with setting ID0x38) that currently fall through the decoder. Having payload + correlation in the log makes it feasible to build up a response map from field logs instead of having to add a bespoke handler per opcode.SetPersonalizedVolumeappears to have no audible effect on Pro 3 and the0x004Cresponses captured in earlier logs stop appearing in later sessions — so the correlation data is what we need next to tell "device ignoring our write" apart from "device acked via an opcode we're not decoding".